<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateShopArchivesTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_archives', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger("shopId")->default(0)->comment("店铺id");
            $table->string('wechat', 32)->default('')->comment('个人微信号');
            $table->string('wechatUrl', 255)->default('')->comment('个人微信号URL');
            $table->string('wechatPic', 255)->default('')->comment('上传微信号的图片地址');

            $table->string('eWechat', 32)->default('')->comment('企业微信号/群');
            $table->string('eWechatUrl', 255)->default('')->comment('企业微信号/群 URL');
            $table->string('eWechatPic', 255)->default('')->comment('企业微信号/群的图片地址');

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('updatedAt')->default(0)->comment('更新时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('更新人');
            $table->tinyInteger("isDeleted")->default(0)->comment("是否删除,0:未删除,1:已删除");

            $table->collation = 'utf8mb4_general_ci';
            $table->comment   = '门店附加信息';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_archives');
    }
}
